﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using System.Runtime.Serialization;
using System.ComponentModel;

namespace DTD2013.Entities
{
    public partial class CongTac
    {
        #region Extra properties

        public int ID { get; set; }
        public int ParentID { get; set; }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double KhoiLuong
        {
            get
            {
                return _KhoiLuong;
            }
            set
            {
                OnKhoiLuongChanging(value);
                ReportPropertyChanging("KhoiLuong");
                _KhoiLuong = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("KhoiLuong");
                OnKhoiLuongChanged();
            }
        }
        private double _KhoiLuong;
        partial void OnKhoiLuongChanging(double value);
        partial void OnKhoiLuongChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double HSVL
        {
            get
            {
                return _HSVL;
            }
            set
            {
                OnHSVLChanging(value);
                ReportPropertyChanging("HSVL");
                _HSVL = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HSVL");
                OnHSVLChanged();
            }
        }
        private double _HSVL;
        partial void OnHSVLChanging(double value);
        partial void OnHSVLChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double HSNC
        {
            get
            {
                return _HSNC;
            }
            set
            {
                OnHSNCChanging(value);
                ReportPropertyChanging("HSNC");
                _HSNC = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HSNC");
                OnHSNCChanged();
            }
        }
        private double _HSNC;
        partial void OnHSNCChanging(double value);
        partial void OnHSNCChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double HSCM
        {
            get
            {
                return _HSCM;
            }
            set
            {
                OnHSCMChanging(value);
                ReportPropertyChanging("HSCM");
                _HSCM = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HSCM");
                OnHSCMChanged();
            }
        }
        private double _HSCM;
        partial void OnHSCMChanging(double value);
        partial void OnHSCMChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double TTVL
        {
            get
            {
                return _TTVL;
            }
            set
            {
                OnTTVLChanging(value);
                ReportPropertyChanging("TTVL");
                _TTVL = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("TTVL");
                OnTTVLChanged();
            }
        }
        private double _TTVL;
        partial void OnTTVLChanging(double value);
        partial void OnTTVLChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double TTNC
        {
            get
            {
                return _TTNC;
            }
            set
            {
                OnTTNCChanging(value);
                ReportPropertyChanging("TTNC");
                _TTNC = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("TTNC");
                OnTTNCChanged();
            }
        }
        private double _TTNC;
        partial void OnTTNCChanging(double value);
        partial void OnTTNCChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double TTCM
        {
            get
            {
                return _TTCM;
            }
            set
            {
                OnTTCMChanging(value);
                ReportPropertyChanging("TTCM");
                _TTCM = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("TTCM");
                OnTTCMChanged();
            }
        }
        private double _TTCM;
        partial void OnTTCMChanging(double value);
        partial void OnTTCMChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double TongCong
        {
            get
            {
                return _TongCong;
            }
            set
            {
                OnTongCongChanging(value);
                ReportPropertyChanging("TongCong");
                _TongCong = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("TongCong");
                OnTongCongChanged();
            }
        }
        private double _TongCong;
        partial void OnTongCongChanging(double value);
        partial void OnTongCongChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double DGDD
        {
            get
            {
                return _DGDD;
            }
            set
            {
                OnDGDDChanging(value);
                ReportPropertyChanging("DGDD");
                _DGDD = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("DGDD");
                OnDGDDChanged();
            }
        }
        private double _DGDD;
        partial void OnDGDDChanging(double value);
        partial void OnDGDDChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        //[EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        //[DataMemberAttribute()]
        public double GDD
        {
            get
            {
                return _GDD;
            }
            set
            {
                OnGDDChanging(value);
                ReportPropertyChanging("GDD");
                _GDD = StructuralObject.SetValidValue(Math.Round(value, 0));
                ReportPropertyChanged("GDD");
                OnGDDChanged();
            }
        }
        private double _GDD;
        partial void OnGDDChanging(double value);
        partial void OnGDDChanged();

        #endregion

        #region Navigation properties

        public BindingList<DinhMuc> HaoPhiCongViecs { get; set; }

        #endregion

        public CongTac()
        {
            _HSVL = 1;
            _HSNC = 1;
            _HSCM = 1;
            _DGVL = 0;
            _DGNC = 0;
            _DGCM = 0;
            HaoPhiCongViecs = new BindingList<DinhMuc>();
        }
    }
}
